package com.example.model;

import java.util.ArrayList;


public class OutResult {
	
	public static int CODE_OK = 200;
	public static int CODE_TOKEN = 403;
	public static int CODE_ERROR_CONNCECT = 12;
	public static int CODE_ERROR_JSON     = 13;
	public static int CODE_ERROR_SYSTEM   = 14;
	public static int CODE_ERROR_EMPTY    = 15;
	
	public static final String STATUS = "status";
	public static final String MESSAGE = "message";
	public static final String RESON = "reasons";
	public static final String CODE = "code";
	private boolean status = false;
	private String message = "";
	private int  code = -1;
	private String reson   = "";
	

	public String getReson(){
		return reson;
	}
	public void setReson(String reson){
		this.reson  = reson;
	}
	public boolean getStatus(){
		return status;
	}
	public void setStatus(boolean status) {
		this.status = status;
	}
	public void setStatus(String status){
		if(status.equalsIgnoreCase("true")){
			this.status  = true;
		}else{
			this.status  = false;
		}
	}
	
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	/**
	 * @return the code
	 */
	public int getCode() {
		return code;
	}
	/**
	 * @param code the code to set
	 */
	public void setCode(int code) {
		this.code = code;
	}
	public void setCode(String code) {
		if(code != null && code.length() >0 ){
			this.code = Integer.parseInt(code);
		}
		
	}

	

}
